 <ul class="posts">
    {% for post in posts %}
    {% if not post.disabled %}
    <li class="post">
        <div class="title">
            <h2>{{ post.title }}</h2>
        </div>
        <div class="profile-thumbnail">
            <a href="{{ url_for('.user',username=post.author.username) }}">
                <img class="img-rounded profile-thumbnail" src="{{ post.author.gravatar(size=40) }}">
            </a>
        </div>
        <div class="post-content">
            <div class="post-date">
            {{ moment(post.post_date).fromNow() }}
            </div>
            <div class="post-author">
                <a href="{{ url_for('.user',username=post.author.username) }}"></a>
            </div>
            <div class="post-body">
            {% if post.content_html %}
                 {{ post.content_html | safe | truncate(400,True)}}
            {% else %}
                 {{ post.post_content}} 
            {% endif %}
            </div>
            <div class="post-like col-md-3">
                <a href="{{url_for('.add_like',id=post.id)}}">
                    <span class="label label-default">赞
                    </span>
                </a>
                {{post.like}}人喜欢
            </div>
            <div class="post-read col-md-3">
                <p>{{post.reads}}人看过</p>
            </div>
            <div class="post-footer">
                <a href="{{ url_for('.post',id = post.id)}}">
                    <span class="label label-default"> 文章链接</span>
                </a>
                <a href="{{ url_for('.post',id=post.id) }}#comments">
                <span class="label label-primary">
                {{ post.comments.count()}} 条评论
                </span>
                </a>
            </div>
        </div>
    </li>
    {% endif %}
    {% endfor %}
</ul>